//package cn.hx.controller.system;
//
//import cn.hx.entity.UserEvaluation;
//import cn.hx.entity.UserInfo;
//import cn.hx.service.UserEvaluationService;
//import cn.hx.service.UserInfoService;
//import cn.hx.service.UserReportService;
//import org.springframework.stereotype.Controller;
//import org.springframework.ui.ModelMap;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//
//import javax.annotation.Resource;
//
//@Controller
//public class UserEvaluationController {
//
//    @Resource
//    private UserEvaluationService userEvaluationService;
//
//    @Resource
//    private UserInfoService userInfoService;
//
//    @Resource
//    private UserReportService userReportService;
//
//    @GetMapping("system/evaluation/evaluationList")
//    public String evaluationLists(
//            ModelMap modelMap,
//            @RequestParam(defaultValue = "1") int page,
//            @RequestParam(defaultValue = "5") int size,
//            UserEvaluation userEvaluation) {
//        modelMap.addAttribute("evaluationPage", userEvaluationService.page(userEvaluation,page, size));
//        return "system/evaluation/evaluationList";
//    }
//
//    @GetMapping("system/evaluation/evaluationItem/{id}")
//    public String Item(@PathVariable Integer id, ModelMap modelMap) {
//        modelMap.addAttribute("evaluationItem", userEvaluationService.queryById(id));
//        return "system/evaluation/evaluationItem";
//    }
//
//    @GetMapping("system/evaluation/evaluationEdit/{id}")
//    public String update(@PathVariable Integer id, ModelMap map) {
//        map.addAttribute("evaluation", userEvaluationService.queryById(id));
//        map.addAttribute("userList",userInfoService.queryAllByLimit(new UserInfo(),0,100));
//        map.addAttribute("reportList",userReportService.queryAllByLimit(0,100));
//        return "system/evaluation/evaluationEdit";
//    }
//
//    @PostMapping("system/evaluation/evaluationEdit/{id}")
//    public String updateSubmit(UserEvaluation userEvaluation) {
//        userEvaluationService.update(userEvaluation);
//        return "redirect:/system/evaluation/evaluationList";
//    }
//
//    @GetMapping("system/evaluation/evaluationEdit")
//    public String add(ModelMap map) {
//        map.addAttribute("userList",userInfoService.queryAllByLimit(new UserInfo(),0,100));
//        map.addAttribute("reportList",userReportService.queryAllByLimit(0,100));
//        return "system/evaluation/evaluationEdit";
//    }
//
//    @PostMapping("system/evaluation/evaluationEdit")
//    public String addDept(UserEvaluation userEvaluation) {
//        userEvaluationService.insert(userEvaluation);
//        return "redirect:/system/evaluation/evaluationList";
//    }
//
//    @GetMapping("system/evaluation/evaluationList/{id}")
//    public String delete(@PathVariable Integer id) {
//        userEvaluationService.deleteById(id);
//        return "redirect:/system/evaluation/evaluationList";
//    }
//}
